package com.jhgk.jhcee.system.controller;

import com.jhgk.jhcee.common.resultful.BasisResultful;
import com.jhgk.jhcee.data.auth.entity.SysUserInfo;
import com.jhgk.jhcee.system.domain.model.SysUserInfoModel;
import com.jhgk.jhcee.system.service.SysUserInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description:
 * @Author: lemon_xzp
 * @Date: 2021/10/2 15:32
 */
@RestController
@RequestMapping("/user")
@Api(value = "普通用户信息", tags = {"普通用户信息"})
public class SysUserInfoController {

    @Resource(name = "SysUserInfoServiceImpl")
    private SysUserInfoService sysUserInfoService;

    @PostMapping("/registerUser")
    @ApiOperation("注册用户信息")
    public BasisResultful<SysUserInfo> registerUser(@RequestBody @Validated SysUserInfo userInfo, BindingResult result) {
        return sysUserInfoService.register(userInfo);
    }
}
